/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   Module Name          : com.yaodian100.ec.delivery.entity.DeliveryRule
   Module Description   :

   Date Created      : 2010/12/15
   Original Author   : feeling.wang
   Team              : yaodian100
   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   MODIFICATION HISTORY
   ------------------------------------------------------------------------------
   Date Modified       Modified by       Comments
   ------------------------------------------------------------------------------
   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
package com.yaodian100.ec.delivery.entity;

import java.math.BigDecimal;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import com.yaodian100.core.common.entity.BaseEntity;

/**
 * @author feeling.wang
 * 
 */
@Entity
@Table(name = "EC_DELIVERY_RULE")
public class DeliveryRule extends BaseEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = 5293345135754459857L;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO, generator = "seq_ec_delivery_rule")
	@SequenceGenerator(name = "seq_ec_delivery_rule", sequenceName = "SEQ_EC_DELIVERY_RULE")
	@Column(name = "OID")
	private Long oid;

	// NML-一般單 ; SCM-轉單 ; LUX-精品
	@Column(name = "TYPE", nullable = false, length = 10)
	private String type;

	// ZJS-宅急送 ; SE-星晨 ; SF-順豐
	@Column(name = "DELIVERY_COMPANY_ID", nullable = false, length = 10)
	private String deliveryCompanyId;

	@Column(name = "FROM_PROVINCE", nullable = false, length = 20)
	private String fromProvince;

	// 預留，初期不列入 UK
	@Column(name = "FROM_CITY", length = 20)
	private String fromCity;

	// 預留，初期不列入 UK
	@Column(name = "FROM_DISTRICT", length = 20)
	private String fromDistrict;

	@Column(name = "TO_PROVINCE", nullable = false, length = 20)
	private String toProvince;

	@Column(name = "TO_CITY", nullable = false, length = 20)
	private String toCity;

	@Column(name = "TO_DISTRICT", nullable = false, length = 20)
	private String toDistrict;

	// 10-SHIP ; 20-COD ; 30-POS
	@Column(name = "SERVICE", nullable = false, length = 2)
	private String service;

	@Column(name = "DELIVERY_REQUIRED_MAX_HRS", columnDefinition = "numeric(3,0)")
	private BigDecimal deliveryRequiredMaxHrs = BigDecimal.ZERO;

	@Column(name = "DELIVERY_REQUIRED_MIN_HRS", columnDefinition = "numeric(3,0)")
	private BigDecimal deliveryRequiredMinHrs = BigDecimal.ZERO;

	@Lob
	@Column(name = "DELIVERY_SUPPORT_AREA", columnDefinition = "CLOB")
	private String deliverySupportArea;

	@Lob
	@Column(name = "DELIVERY_NONE_SUPPORT_AREA", columnDefinition = "CLOB")
	private String deliveryNoneSupportArea;

	// format：201012010001
	@Column(name = "VERSION", nullable = false, length = 12)
	private String version;

	@Column(name = "REMARK", length = 1024)
	private String remark;

	public Long getOid() {
		return oid;
	}

	public String getType() {
		return type;
	}

	public String getDeliveryCompanyId() {
		return deliveryCompanyId;
	}

	public String getFromProvince() {
		return fromProvince;
	}

	public String getFromCity() {
		return fromCity;
	}

	public String getFromDistrict() {
		return fromDistrict;
	}

	public String getToProvince() {
		return toProvince;
	}

	public String getToCity() {
		return toCity;
	}

	public String getToDistrict() {
		return toDistrict;
	}

	public String getService() {
		return service;
	}

	public BigDecimal getDeliveryRequiredMaxHrs() {
		return deliveryRequiredMaxHrs;
	}

	public BigDecimal getDeliveryRequiredMinHrs() {
		return deliveryRequiredMinHrs;
	}

	public String getDeliverySupportArea() {
		return deliverySupportArea;
	}

	public String getDeliveryNoneSupportArea() {
		return deliveryNoneSupportArea;
	}

	public String getVersion() {
		return version;
	}

	public String getRemark() {
		return remark;
	}

	public void setOid(Long oid) {
		this.oid = oid;
	}

	public void setType(String type) {
		this.type = type;
	}

	public void setDeliveryCompanyId(String deliveryCompanyId) {
		this.deliveryCompanyId = deliveryCompanyId;
	}

	public void setFromProvince(String fromProvince) {
		this.fromProvince = fromProvince;
	}

	public void setFromCity(String fromCity) {
		this.fromCity = fromCity;
	}

	public void setFromDistrict(String fromDistrict) {
		this.fromDistrict = fromDistrict;
	}

	public void setToProvince(String toProvince) {
		this.toProvince = toProvince;
	}

	public void setToCity(String toCity) {
		this.toCity = toCity;
	}

	public void setToDistrict(String toDistrict) {
		this.toDistrict = toDistrict;
	}

	public void setService(String service) {
		this.service = service;
	}

	public void setDeliveryRequiredMaxHrs(BigDecimal deliveryRequiredMaxHrs) {
		this.deliveryRequiredMaxHrs = deliveryRequiredMaxHrs;
	}

	public void setDeliveryRequiredMinHrs(BigDecimal deliveryRequiredMinHrs) {
		this.deliveryRequiredMinHrs = deliveryRequiredMinHrs;
	}

	public void setDeliverySupportArea(String deliverySupportArea) {
		this.deliverySupportArea = deliverySupportArea;
	}

	public void setDeliveryNoneSupportArea(String deliveryNoneSupportArea) {
		this.deliveryNoneSupportArea = deliveryNoneSupportArea;
	}

	public void setVersion(String version) {
		this.version = version;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}
}
